<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<form name="paging" action="${url}" method="post">
	<div style="align:left;">
		<br/>
		<span>共${pageResults.totalCount}条记录，当前第${pageResults.currentPage}/${pageResults.totalPage}页，每页${pageResults.pageSize}条记录</span>
		<a href="${url}"><img src="../images/icons/firstPage.jpg" /></a>
		<c:choose>
			<c:when test="${pageResults.currentPage > 1}">
				<a href="${url}&page=${pageResults.currentPage - 1}">
					<img src="../images/icons/prevPage.jpg" />
				</a>
			</c:when>
			<c:otherwise>
				<a href="#"><img src="../images/icons/prevPage.jpg" /></a>
			</c:otherwise>
		</c:choose>

		<c:choose>
			<c:when test="${pageResults.currentPage < pageResults.totalCount}">
				<a href="${url}&page=${pageResults.currentPage + 1}">
					<img src="../images/icons/nextPage.jpg" />
				</a>
			</c:when>
			<c:otherwise>
				<a href="#"><img src="../images/icons/nextPage.jpg" /></a>
			</c:otherwise>
		</c:choose>

		<a href="${url}&page=${pageResults.totalPage}">
			<img src="../images/icons/lastPage.jpg" />
		</a> &nbsp; 跳转到 
		<select id="page" name="page" onchange="gotoPage()">
			<c:forEach begin="1" end="${pageResults.totalPage}" step="1" var="a">
				<option value="${a}" ${pageResults.currentPage==a?"selected":""}>${a}</option>
			</c:forEach>
		</select>页 &nbsp;&nbsp;
		<select id="pageSize" name="pageSize" onchange="changePageSize()">
			<option value="10" selected="selected">10</option>
			<option value="30">30</option>
			<option value="50">50</option>
		</select>
	</div>
</form>
<script type="text/javascript">
	function gotoPage(){
		//var pageNo = document.getElementById("pageNo").value;
		//location.href("${url}&page=" + pageNo);
		document.paging.submit();
	}
	function changePageSize(){
		//var pageSize = document.getElementById("pageSize").value;
		document.paging.submit();
	}
</script>